import Mock from "mockjs";
import homeApi from "./home.js";
import userApi from "./user/index";
import favoriteApi from "./favorite/index";
import csstaffwageApi from "./csstaffwage/index";
import csstaffperApi from "./csstaffper/index";
//设置延时200-2000毫秒
Mock.setup({ timeout: "300-2000" });
//首页相关
//拦截的是/home/getData
Mock.mock("http://localhost:9527/shop", "get", homeApi.getStatisticalDate);

//获取用户数据
Mock.mock("http://localhost:9527/user/get", "get", userApi.getUserList);
Mock.mock("http://localhost:9527/user/create", "'get'", userApi.createUser); //新建用户
Mock.mock("http://localhost:9527/user/delete", "get", userApi.deleteUser); //单个删除
Mock.mock("http://localhost:9527/user/update", "get", userApi.updateUser); //编辑用户
Mock.mock("http://localhost:9527/user/batch", "get", userApi.batchremove); //批量移除

Mock.mock("http://localhost:9527/favorite/get", "get", favoriteApi.getFavoriteList);
Mock.mock("http://localhost:9527/favorite/create", "'get'", favoriteApi.createFavorite); //新建用户
Mock.mock("http://localhost:9527/favorite/delete", "get", favoriteApi.deleteFavorite); //单个删除
Mock.mock("http://localhost:9527/favorite/update", "get", favoriteApi.updateFavorite); //编辑用户
Mock.mock("http://localhost:9527/favorite/batch", "get", favoriteApi.batchremove); //批量移除

Mock.mock("http://localhost:9527/csstaffwage/get", "get", csstaffwageApi.getCsstaffwageList);
Mock.mock("http://localhost:9527/csstaffwage/create", "'get'", csstaffwageApi.createCsstaffwage); //新建用户
Mock.mock("http://localhost:9527/csstaffwage/delete", "get", csstaffwageApi.deleteCsstaffwage); //单个删除
Mock.mock("http://localhost:9527/csstaffwage/update", "get", csstaffwageApi.updateCsstaffwage); //编辑用户
Mock.mock("http://localhost:9527/csstaffwage/batch", "get", csstaffwageApi.batchremove); //批量移除

Mock.mock("http://localhost:9527/csstaffper/get", "get", csstaffperApi.getCsstaffperList);
Mock.mock("http://localhost:9527/csstaffper/create", "'get'", csstaffperApi.createCsstaffper); //新建用户
Mock.mock("http://localhost:9527/csstaffper/delete", "get", csstaffperApi.deleteCsstaffper); //单个删除
Mock.mock("http://localhost:9527/csstaffper/update", "get", csstaffperApi.updateCsstaffper); //编辑用户
Mock.mock("http://localhost:9527/csstaffper/batch", "get", csstaffperApi.batchremove); //批量移除